﻿using IQKS.AWP.BusinessAccessLayer;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_CandidateDeleteReport : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnSearch_Click(object sender, EventArgs e)
    {
        string strEmailId = Convert.ToString(txtEmailId.Text.Trim());
        string strDeletedType = Convert.ToString(drbDeletedType.SelectedValue);
        DataSet objDs;
        lblErrorMsg.Visible = false;
        gvDeletedCandidate.Visible = false;
        try
        {
            int isdeleted = 0;
            objDs = new UserMasterBAL().GetDeletedCandidate( strEmailId,  strDeletedType);
            //GetCandidateDetails(objDs.Tables[1]);
            if (objDs.Tables[0].Rows.Count == 0)
            {
                lblErrorMsg.Text = "Record Not Found..";
                lblErrorMsg.Visible = true;
            }
            else {
                //isdeleted = Convert.ToInt32(objDs.Tables[0].Rows[0]["IsDeleted"]);
                gvDeletedCandidate.Visible = true;

                gvDeletedCandidate.DataSource = objDs;
                gvDeletedCandidate.DataBind();
                //ViewState["strUserId"] = Convert.ToString(objDs.Tables[0].Rows[0]["UserId"]);
                //ViewState["strCid"] = Convert.ToString(objDs.Tables[0].Rows[0]["CandidateID"]);

            }


        }
        catch (Exception exception)
        {
            exception.AddErrorToLog(); //throw new ApplicationException(exception.Message);
        }

    }
}